//
//  TKIMPhotoModel.m
//  TKPluginDemo
//
//  Created by liupm on 16/1/12.
//  Copyright © 2016年 liupm. All rights reserved.
//

#import "TKIMPhotoModel.h"
@interface TKIMPhotoModel()
@end

@implementation TKIMPhotoModel

-(UIImage *)originImage
{
    if (!_originImage)
    {
        _originImage = [UIImage imageWithCGImage: _asset.defaultRepresentation.fullScreenImage];
    }
    return _originImage;
}

-(UIImage *)thumbImage
{
    if (!_thumbImage)
    {
        _thumbImage = [UIImage imageWithCGImage:_asset.aspectRatioThumbnail];
    }
    return _thumbImage;
}

- (BOOL)isVideoType
{
    NSString *type = [_asset valueForProperty:ALAssetPropertyType];
    //媒体类型是视频
    return [type isEqualToString:ALAssetTypeVideo];
}



@end
